﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Biz_Dal.Biz;

namespace Project_BookIdeas
{
    public partial class FormQLSach : Form
    {
        public FormMain frmMain;
        public FormQLNhaXuatBan frmNXB;
        public FormQLTheLoai frmTheLoai;
        public FormQLSach()
        {
            InitializeComponent();
            TXS();
            ptbHinhAnh.Image = Properties.Resources.images;
        }

        private void btnThemTheLoai_Click(object sender, EventArgs e)
        {
            frmTheLoai = new FormQLTheLoai();
            this.Hide();
            frmTheLoai.frmQLSach = this;
            frmTheLoai.ShowDialog();
            this.Show();
        }

        private void btnThemNXB_Click(object sender, EventArgs e)
        {
            frmNXB = new FormQLNhaXuatBan();
            this.Hide();
            frmNXB.frmQLSach = this;
            frmNXB.ShowDialog();
            this.Show();
        }

        #region "Button"
        private void TXS()
        {
            panelThemSuaXoa.Visible = true;
            panelLuuHuy.Visible = false;
        }

        private void LuuHuy()
        {
            panelThemSuaXoa.Visible = false;
            panelLuuHuy.Visible = true;
        }
        #endregion


        #region "Button thêm - xoá - sửa - huỷ - lưu click"
        private void btnLuu_Click(object sender, EventArgs e)
        {

        }

        private void btnHuy_Click(object sender, EventArgs e)
        {
            txtId.Text = "-1";
            txtMaSach.Clear();
            txtTacGia.Clear();
            txtDonGia.Clear();
            //


            //
            ptbHinhAnh.Image = Properties.Resources.images;
            txtNoiDung.Clear();
        }

        private void btnThem_Click(object sender, EventArgs e)
        {

        }

        private void btnSua_Click(object sender, EventArgs e)
        {

        }

        private void btnXoa_Click(object sender, EventArgs e)
        {

        }
        #endregion
    }
}
